package com.lanou.musicproject.volley;

import com.android.volley.AuthFailureError;
import com.android.volley.Response;
import com.android.volley.toolbox.StringRequest;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by 王世美 on 15/9/29.
 */
public class StringRequestWithHeaders extends StringRequest {
    public StringRequestWithHeaders(int method, String url, Response.Listener<String> listener, Response.ErrorListener errorListener) {
        super(method, url, listener, errorListener);
    }

    public StringRequestWithHeaders(String url, Response.Listener<String> listener, Response.ErrorListener errorListener) {
        super(url, listener, errorListener);
    }

    @Override
    public Map<String, String> getHeaders() throws AuthFailureError {
        Map<String,String> headers = new HashMap<>();
        headers.put("Cookie","device=and#100C#4.2.2#3.5.0#1080#1920#developer.baidu.com#wifi#685#com.xiangha#1#5871185465;xhCode=D77EE8801F23E50568D249AC7AE87150;USERID=i9u7dph9b3dts0u63d3789cpd4");
        return headers;
    }
}
